import request from '@/utils/request'

export function allFactories(){
  return request({
    url: '/drug/factories/facList',
    method: 'get'
  })
}
export function listDrugs(query) {
  return request({
    url: '/drug/pill/list',
    method: 'get',
    params: query
  })
}

export function addDrug(data) {
  return request({
    url: '/drug/pill/add',
    method: 'post',
    data: data
  })
}

export function getDrug(drugId) {
  return request({
    url: '/drug/pill/' + drugId,
    method: 'get'
  })
}

export function updateDrug(data) {
  return request({
    url: '/drug/pill/',
    method: 'put',
    data: data
  })
}

export function delDrugs(drugIds) {
  return request({
    url: '/drug/pill/' + drugIds,
    method: 'delete'
  })
}




